package com.hqx.oop.mall;

public class OrderItem {
    private Product product;
    private int quantity; //商品数量

    public OrderItem(Product product, int quantity) {
        this.product = product;
        this.quantity = quantity;
    }

    public double computePrice() {
        return product.getPrice() * quantity;
    }
}
